home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / AVOGADRO / CHEMISTRY / MOLEDRAW / !MoleDraw / !Help < prev    next >
Text File  |  1996-05-21  |  44KB  |  972 lines

  1. /***************************************************************************\
  2. *                                                                           *
  3. *       !MoleDraw,                                                          *
  4. *                                                                           *
  5. *       Molecular DTP,                                                      *
  6. *                                                                           *
  7. *       version 0.239D (21-May-96),                                         *
  8. *                                                                           *
  9. *       © Simon Kilvington, 1993-96                                         *
  10. *                                                                           *
  11. \***************************************************************************/
  12.  
  13.  
  14.    MoleDraw is an object based drawing program orientated towards producing
  15. diagrams of chemical structures. It allows you to easily draw pictures of
  16. molecules which can then be exported as Draw files to other applications.
  17.  
  18.    To ease the transfer of data between MoleDraw and other applications it
  19. supports the new RISC OS global clipboard. This allows you to cut, or copy,
  20. data from one application and paste it into another, all at the touch of a
  21. couple of keys.
  22.  
  23.  
  24. Compatibility
  25. =============
  26.  
  27.    MoleDraw has only been tested under RISC OS 3.10. It should be compatible
  28. with all versions of RISC OS from 3.00 onwards, but it will not work under
  29. earlier versions.
  30.  
  31.    MoleDraw requires Acorn's DrawFile module.
  32.  
  33.  
  34. Overview
  35. ========
  36.  
  37.    The basic principle behind creating drawings in MoleDraw is very much
  38. like 'Draw'. That is, you choose an object from the toolbox, or from the
  39. menu if you don't like toolboxes, then position it on the drawing.
  40.  
  41.    Once objects have been added to the drawing they may be selected and then
  42. moved, rotated, grouped together, etc.
  43.  
  44.    The main difference between MoleDraw and Draw is that the objects used in
  45. MoleDraw have been chosen to allow chemical structures to be quickly and
  46. easily drawn. MoleDraw also knows about atoms and bonds and uses these
  47. concepts to not only ease the production of neater drawings, but also to
  48. allow you to build connection tables from your diagrams of chemical
  49. structures. The connection tables can be saved as SMILES strings, these are
  50. a popular and simple way of describing the connectivity in chemical
  51. structures as a one dimensional string of characters. They are described in
  52. the file '!MoleDraw.docs.SMILES'.
  53.  
  54.    Although MoleDraw knows about bonds and atoms it allows you to draw any
  55. structure you want, however chemically unreasonable it may be. The
  56. philosophy is "you know what you are doing" and so it does not impose any
  57. constraints on what you can draw. Silly structures can even be exported as
  58. silly SMILES strings, although these will not be accepted as input to the
  59. 2D->3D/3D->2D converter that will be my next project.
  60.  
  61.    MoleDraw's toolbox contains the following tools, each of which may also
  62. be accessed from the main menu. Their use is described below.
  63.  
  64.                 +-------------------+-------------------+
  65.                 | Bond              | Select            |
  66.                 +-------------------+-------------------+
  67.                 | Dashed bond       | Erase             |
  68.                 +-------------------+-------------------+
  69.                 | Wedge             | Label             |
  70.                 +-------------------+-------------------+
  71.                 | Dashed wedge      | Caption           |
  72.                 +-------------------+-------------------+
  73.                 | Thick bond        | Arrows (menu)     |
  74.                 +-------------------+-------------------+
  75.                 | Thick dashed bond | Orbitals (menu)   |
  76.                 +-------------------+-------------------+
  77.                 | Wiggly bond       | Objects (menu)    |
  78.                 +-------------------+-------------------+
  79.                 | Chain             | Reflected chain   |
  80.                 +-------------------+-------------------+
  81.                 | 3 atom ring       | 4 atom ring       |
  82.                 +-------------------+-------------------+
  83.                 | 5 atom ring       | 6 atom ring       |
  84.                 +-------------------+-------------------+
  85.                 | 7 atom ring       | 8 atom ring       |
  86.                 +-------------------+-------------------+
  87.                 | Chair             | Reflected chair   |
  88.                 +-------------------+-------------------+
  89.                 | Cyclopentadiene   | Benzene           |
  90.                 +-------------------+-------------------+
  91.  
  92.    The toolbox icons may be quite big in small screen modes, ie 12 (640x256
  93. pixels), 27 (640x480) etc. This is because I use mode 39 (896x352) which has
  94. a fairly large screen area. Mode 31 (800x600) is also quite nice, and you
  95. get the hi-res icons.
  96.  
  97.  
  98. Using bond and ring tools
  99. =========================
  100.  
  101.    Firstly use the 'Style' menu to choose the colour, line width etc that
  102. you want your new object to have. The description of the 'Style' menu below
  103. explains exactly what is effected by the 'Line width', 'Bold width' etc.
  104.  
  105.    Once you have decided on a style choose the object type you want to add
  106. to the drawing either from the toolbox or the 'Enter' menu. To add an object
  107. to the drawing first click with 'select' where you want the object to
  108. appear. The position of the object will be shown as a light blue outline
  109. which moves as you move the mouse. Once the object is in the desired
  110. position click again with 'select' to add it. You may click with 'adjust' at
  111. this point instead to move the position of the initial click and start
  112. entering the object again.
  113.  
  114.    Pressing the 'Escape' key at any point will abandon the entering process.
  115.  
  116.    From the 'Tools' menu you may select 'Fixed lengths' and/or 'Fixed
  117. angles'. These restrict the size and orientation of the objects and allow
  118. you to ensure that all your molecules turn out the same size. Note that
  119. moving the mouse when entering 'Chain' objects changes the number of bonds
  120. to be added, not the length of the bonds which is always the 'Fixed' bond
  121. length.
  122.  
  123.    Even if 'Fixed lengths' and/or 'Fixed angles' are selected if your last
  124. mouse click when entering a bond is over an atom the bond will end at that
  125. atom. This applies to rings too, and so polycyclic structures can quite
  126. easily be constructed.
  127.  
  128.    The 3, 4, 5, 6, 7 and 8 atom ring tools can be used to produce aromatic
  129. rings, ie with a circle drawn in the middle of them. To get aromatic rings
  130. hold down 'Shift' when you first click with 'select', or if you subsequently
  131. click with 'adjust'. At its closest point, the circle will be one and a half
  132. times the bond spacing away from the bonds that form the ring.
  133.  
  134.    When a new bond is aligned on top of an existing single bond it will
  135. become a double bond, doubles will become triples, and triples will go back
  136. to singles again. This only happens for the single bond tools. The rings,
  137. the chains, and the chairs will not increase the bond order of existing
  138. bonds they overlap.
  139.  
  140.    The program places an atom at the end of each bond, these can not be seen
  141. but may later have a label added to them, or be output as a connection table
  142. in the form of a SMILES string.
  143.  
  144.  
  145. Using tools with a menu
  146. =======================
  147.  
  148.    The 'Arrows', 'Orbitals' and 'Objects' tools each have a menu of objects
  149. associated with them. Before you can use one of these tools you must choose
  150. from its menu which object you want to enter. To display the tool's menu
  151. either click with 'menu' or double click with 'select' on the toolbox icon,
  152. or use the 'Enter' menu. Once an object is chosen from a tool's menu it will
  153. be used each time the tool is used.
  154.  
  155.    Once an object has been associated with the tool proceed as before to add
  156. it to the drawing, ie click with 'select' initially, move the mouse to
  157. position the object correctly, and click with 'select' again to add it.
  158.  
  159.    As before, 'adjust' can be used to reposition the object's starting
  160. point, and 'Escape' abandons the process.
  161.  
  162.    Note: when entering objects they are drawn as outlines to speed up the
  163. screen update. However, when entering orbitals there may be some doubt as to
  164. which lobe will be filled and which will be clear. If there is any doubt the
  165. lobe closest to the mouse pointer will be the one coloured in.
  166.  
  167.  
  168. Atom labels
  169. ===========
  170.  
  171.    To add a label to an atom choose the label tool from the toolbox and
  172. click with 'select' over the appropriate atom. A dialogue box will open
  173. allowing you to edit the atom's label.
  174.  
  175.    Atoms may be labelled with either a dot, eg to highlight the position of
  176. an atom between two double bonds, or with some text. The top left part of
  177. the dialogue box allows you to decide which you would prefer. If you choose
  178. a dot the rest of the dialogue box is ignored, so just click on 'OK' to add
  179. the dot to the drawing. The radius of the dot is about a third of the label
  180. font size.
  181.  
  182.    If you choose to label your atom with text the other two areas of the
  183. dialogue box need to be set up. Firstly the text itself can be entered. Two
  184. characters have special meanings when entering the text for labels, these
  185. are '^' which causes the next character to be superscripted, and '_' which
  186. subscripts the next character. So typical label texts might be 'H_2N',
  187. 'COO^-', or even 'CO_2^-'. The final section of the label dialogue box deals
  188. with the position of the text relative to the atom. 'Left', 'Right', and
  189. 'Centre' mean that the leftmost, rightmost, or central character in the
  190. label should be placed at the atom's position. 'Above' and 'Below' mean the
  191. label text is stacked vertically above, or below, the atom. If you delete
  192. the text of an atom label and then click on the 'OK' button the label will
  193. be deleted.
  194.  
  195.    While 'Label' is the selected tool the 'Style' menu can be used to alter
  196. the font type, size and colour used to label atoms. If an atom is already
  197. labelled and you edit it with the label dialogue box the existing font
  198. style, size and colour will be retained. To force a label to adopted the new
  199. settings you should first select it and then use the 'Style' menu to alter
  200. it. Alternatively you can delete it, either with the 'Erase' tool or by
  201. deleting its text using the label dialogue box, and then re-create it in the
  202. new style.
  203.  
  204.    Note: only one font can be used per label. However it may sometimes be
  205. necessary to use a mix of Greek and Roman letters in an atom label. To
  206. overcome this problem there are two fonts available, TimesGR and
  207. HelveticaGR, that combine both Greek and Roman characters. These were
  208. designed by the Archimedes Club of Athens and are public domain. The
  209. '!Chars' application comes in handy here too! If the fonts were not included
  210. with this program they are available via anonymous ftp from HENSA,
  211. ('micros.hensa.ac.uk' - look for 'GREEKFONTS' in the index), or from me if
  212. you do not have access to the internet.
  213.  
  214.  
  215. Captions
  216. ========
  217.  
  218.    To add a caption to your drawing choose the caption tool and click with
  219. 'select' where you want the caption to start. Alternatively you may click
  220. with 'select' within an existing caption, this will allow you to alter its
  221. text.
  222.  
  223.    Characters typed on the keyboard will be added to the caption. As is
  224. usual the cursor keys may be used to move about in the text. Holding down
  225. 'Ctrl' while pressing the left or right cursor key will move to the start or
  226. the end of the text. 'Shift' and the left or right cursor key moves the
  227. caret to the start of the previous or next word. The 'Copy' key will delete
  228. the character in front of the caret, and 'Delete' or backspace will delete
  229. the character behind it.
  230.  
  231.    The main menu will change into the captions menu while a caption is being
  232. edited. This has options to allow you to change the font, the colour of the
  233. text etc. See the menu section below for full details.
  234.  
  235.    To finish editing a caption and to add it to the drawing either choose
  236. 'Finish' from the caption menu or press 'Return'. As you may have realised
  237. this means captions may only contain a single line of text. This should be
  238. enough for most purposes as MoleDraw is designed for drawing diagrams, not
  239. writing essays. However, if you feel this is a major omission please let me
  240. know. I am a democracy so if the will of the people is for multiline
  241. captions they will (probably) be implemented.
  242.  
  243.    Pressing 'Escape' or choosing 'Abandon' from the menu at any point will
  244. return the caption to its original state, ie before you started editing it.
  245.  
  246.    Note: you may click with 'select' somewhere within the caption you are
  247. currently editing, this will move the caret to the character position
  248. closest to the mouse. If you click outside the current caption, the current
  249. caption will be added to the drawing (as if 'Finish' had been chosen) and a
  250. new caption will be started at the mouse position (or, if there is one, the
  251. caption under the mouse will be edited).
  252.  
  253.  
  254. Erase tool
  255. ==========
  256.  
  257.    The 'Erase' tool will delete whatever it is clicked over. Be careful,
  258. groups count as a single object!
  259.  
  260.    The only time this does not apply is if the tool is clicked over a bond
  261. or an atom. In this case only that bond or atom is removed, even if it is
  262. part of a group. When an atom is deleted, all bonds to it are also deleted.
  263.  
  264.  
  265. Select mode
  266. ===========
  267.  
  268.    When in select mode existing objects may be selected and subsequently
  269. edited. To select an object click with 'select' somewhere within it, it will
  270. be highlighted by having a red box drawn around it, and any previously
  271. selected objects will be unselected. To add an object to the current
  272. selection, or to remove a selected object from the selection, click on it
  273. with 'adjust'. By double clicking with 'select' it is possible to burrow
  274. through a stack of objects to select ones at the bottom. Finally objects may
  275. be selected/unselected by using 'select' or 'adjust' to drag out a box
  276. around them. In other words it works in exactly the same way Draw does.
  277.  
  278.    Once you have made a selection of one or more objects it may be edited in
  279. a number of ways. The selection can be moved by dragging from within one of
  280. the objects, all the selected objects will be moved by the same amount.
  281. Rotation and resizing of the selected objects is also possible by dragging
  282. either the top right or bottom right selection box 'ear'. Again it works in
  283. exactly the same way Draw does. (This is the beauty of having a windowing
  284. system with a consistent user interface, once you know how to work one
  285. program all similar ones are easy).
  286.  
  287.    You may cancel a move, rotate, or resize action at any time while you are
  288. dragging the mouse by pressing the Escape key.
  289.  
  290.    The selection can be acted upon with the 'Edit' menu. This allows you to,
  291. amongst other things, group and ungroup objects, rotate and scale them by
  292. specific amounts, and flip them horizontally and vertically. The 'Edit' menu
  293. also gives you access to clipboard operations. See the Menus section below
  294. for full details.
  295.  
  296.    The selection can also be altered with the 'Style' menu. This effects how
  297. objects appear on the drawing, their colour, font styles etc. Changing a
  298. particular item in the 'Style' menu will alter all relevant objects in the
  299. selection, eg changing the font will effect label and caption objects in the
  300. current selection but will not effect anything else (as they have no text in
  301. them). See the Menus section below for a description of all the style items.
  302.  
  303. Notes:
  304.  
  305.    Holding down the 'Shift' key while clicking with 'select' over a double
  306. bond will alter the positions of the two bonds that form it. They will cycle
  307. between the following three cases:
  308.  
  309.             ------
  310.            C------C      ->      C======C      ->      C------C
  311.                                                         ------
  312.  
  313.    If one molecule is moved, pasted etc, so its atoms overlap another
  314. molecule's atoms the overlapping atoms and bonds will be combined into
  315. single objects. If two overlapping atoms both have labels the furthest
  316. forward label will be kept (use the 'Edit->Front' menu option to bring an
  317. object to the front of the drawing). For overlapping bonds the bond with the
  318. highest bond order is kept. If both bonds have the same bond order the
  319. furthest forward bond is kept.
  320.  
  321.    When a molecule is rotated the text that forms its atom labels will be
  322. kept horizontal.
  323.  
  324.    Resizing an atom label will alter the size of its rubout box but the text
  325. will stay at the same point size. If the label box is made too small some,
  326. or all, of the text may not be displayed.
  327.  
  328.    When another tool is chosen the current selection will be unselected.
  329.  
  330.  
  331. Menus
  332. =====
  333.  
  334.    Note: the close buttons of dialogue boxes act as 'Cancel' buttons, ie
  335. when clicked on everything you've changed is forgotten and the program
  336. returns to exactly the state it was in before the dialogue box was opened.
  337.  
  338. !!! we need real Cancel buttons !!!
  339.  
  340. Iconbar menu
  341.  
  342. Info            leads to a dialogue box showing the program version etc.
  343. Preferences...  choose this to open the preferences window (see later).
  344. Paper limits    leads to a dialogue box that allows you to choose the
  345.                 default paper size and how many pages the drawing extends
  346.                 over. These will be used by all new files. The default paper
  347.                 size and number of pages is stored on disc along with the
  348.                 other preferences when they are saved.
  349. Quit            asks for confirmation if there are unsaved files, and then
  350.                 quits the program.
  351.  
  352.  
  353. Main menu
  354.  
  355. Info            as on the iconbar menu.
  356.  
  357. File
  358.   Info          leads to a dialogue box giving information about this
  359.                 drawing. The size of the file, if it has been modified since
  360.                 it was last saved, etc.
  361.                 keyboard shortcut: ctrl F1
  362.   Save          leads to a 'Save as' dialogue box. If any objects are
  363.                 selected then the dialogue box will contain an icon marked
  364.                 'Selection only'. Choose this and only the selection will be
  365.                 saved.
  366.                 To save a drawing that has been saved before you may just
  367.                 click on 'Save' in the 'File' menu, ie there is no need to
  368.                 open the 'Save as' dialogue box in this case.
  369.                 keyboard shortcut: F3
  370.   Export        leads to a menu of file types that the file may be saved as.
  371.                 Each entry in the 'Export' menu leads to its own 'Save as'
  372.                 dialogue box. See later for a description of each export
  373.                 file type.
  374.   Print...      choose this to open the printer window (see later).
  375.                 keyboard shortcut: Print
  376.   Paper limits  leads to a dialogue box allowing you to alter the size of
  377.                 paper used by this particular drawing. Unlike the iconbar
  378.                 menu option this does not effect any other drawings except
  379.                 this one.
  380.  
  381. Edit
  382.   Undo          returns the drawing to the state it was in before the last
  383.                 operation you did.
  384.                 keyboard shortcut: F8
  385.   Cut           replaces the clipboard data with the current selection, then
  386.                 removes the selected objects from the drawing.
  387.                 Note: the clipboard is an application wide entity and so
  388.                 data placed on the clipboard by MoleDraw can be pasted into
  389.                 other clipboard supporting applications.
  390.                 keyboard shortcut: ctrl X
  391.   Copy          as 'Cut' but the selection is not removed from the drawing.
  392.                 keyboard shortcut: ctrl C
  393.   Paste         adds the contents of the clipboard to the drawing. If the
  394.                 the mouse pointer is over the drawing window the top left
  395.                 corner of the pasted objects will be at the mouse position.
  396.                 If the mouse is not over the window the pasted objects will
  397.                 be centred on the current view.
  398.                 Note: the clipboard contents could have come from another
  399.                 MoleDraw drawing, or even another application. As long as
  400.                 the other application can produce DrawFile format data.
  401.                 keyboard shortcut: ctrl V
  402.   Delete        removes the selection from the drawing.
  403.                 keyboard shortcut: ctrl K
  404.   Select all    selects all the objects in the drawing.
  405.                 keyboard shortcut: ctrl A
  406.   Clear         unselects everything that is currently selected.
  407.                 keyboard shortcut: ctrl Z
  408.   Front         moves the current selection to the top of the drawing so
  409.                 they obscure objects behind them.
  410.                 keyboard shortcut: ctrl F
  411.   Back          moves the current selection to the bottom of the drawing so
  412.                 they are obscured by objects in front of them.
  413.                 keyboard shortcut: ctrl B
  414.   Group         groups the current selection into a single object.
  415.                 Note: groups may be nested, ie groups of groups are allowed.
  416.                 keyboard shortcut: ctrl G
  417.   Ungroup       ungroups selected objects that have previously been grouped.
  418.                 keyboard shortcut: ctrl U
  419.   Scale         leads to a dialogue box that allows you to scale the
  420.                 currently selected objects in the X and Y directions.
  421.                 Negative scaling factors can be used to invert an object.
  422.                 keyboard shortcut: ctrl S
  423.   Rotate        leads to a writeable menu entry that allows you to rotate
  424.                 the selected objects through a given angle. The angle should
  425.                 be in degrees. Positive angles specify clockwise rotations.
  426.                 Rotation of each object (groups count as a single object)
  427.                 takes place about its centre.
  428.                 keyboard shortcut: ctrl R
  429.   Horizontal flip       these last two options flip the selected objects
  430.   Vertical flip         either horizontally or vertically.
  431.  
  432. Style           altering options in the 'Style' menu has a different effect
  433.                 depending on whether there are any selected objects or not.
  434.                 If no objects are selected the 'Style' menu allows you to
  435.                 choose how objects you subsequently add to the drawing will
  436.                 appear. If there is a current selection then altering
  437.                 options in the 'Style' menu will also change the appearance
  438.                 of any relevant selected objects.
  439.   Font...       when labels or captions are the selected tool choosing this
  440.                 opens a font panel window (see later). This allows you to
  441.                 choose which font, and size, you want.
  442.   Colour        leads to a normal colour chooser dialogue box.
  443.   Line width    the line width determines the width of bonds and other
  444.                 objects.
  445.   Bold width    the bold width effects the width of thick bonds, the width
  446.                 of the ends of wedges, the width of wiggly bonds, and the
  447.                 size of all styles of arrow head.
  448.                 It also determines the size of the gap between the two
  449.                 arrows that form retrosynthetic and equilibrium arrows, and
  450.                 the width of the large outlined and filled arrows. However
  451.                 these will not be effected by changes in the bold width when
  452.                 applied to the current selection.
  453.   Dash spacing  effects dashed bonds, dashed lines (in the objects menu),
  454.                 and dashed arrows.
  455.   Arrow heads   four different styles of arrow head are available, they
  456.                 effect all arrows produced by the arrows menu.
  457.  
  458. Enter           options in the 'Enter' menu have the same effect as choosing
  459.                 the relevant tool from the toolbox.
  460.   Bonds         leads to a menu of possible bond types.
  461.   Rings         leads to a menu of possible ring types.
  462.   Chains        leads to a menu allowing you to choose which direction you
  463.                 want the chain to start in.
  464.   Label
  465.   Caption
  466.   Arrows        leads to the 'Arrows' menu.
  467.   Orbitals      leads to the 'Orbitals' menu.
  468.   Objects       leads to the 'Objects' menu.
  469.  
  470. Select          enters select mode, ie is equivalent to choosing the pointer
  471.                 icon from the toolbox.
  472.                 keyboard shortcut: F6
  473.  
  474. Tools
  475.   Fixed lengths toggles between fixed and unrestrained bond lengths.
  476.   Fixed angles  toggles between fixed and unrestrained angles. The 'angles'
  477.                 referred to are the orientations allowed when entering bond,
  478.                 ring, chain, and orbital objects.
  479.   Rulers        toggles the page rulers on and off.
  480.   Grid          clicking on this option toggles grid lock on and off. It also
  481.                 has a submenu that allows you to choose the shape of grid,
  482.                 the grid spacing, etc. Entering objects when both grid lock
  483.                 and fixed lengths/angles are enabled may be a little
  484.                 confusing. The grid is best used to align objects after they
  485.                 have been drawn.
  486.   Toolbox       toggles the toolbox on and off.
  487.  
  488. View
  489.   Scale view    leads to a dialogue box allowing you to alter the scale of
  490.                 the current view onto the drawing.
  491.                 keyboard shortcut: ctrl F9
  492.   Units         leads to a submenu allowing you to change the units of
  493.                 measurement for the current drawing. This changes things
  494.                 such as the page rulers (if present) and the line width etc
  495.                 dialogue boxes in the 'Style' menu.
  496.   Paper colour  leads to a colour chooser dialogue box that allows you to
  497.                 alter the background colour of the drawing. This only alters
  498.                 the background colour used on the screen (and in things that
  499.                 need to obscure what is below them, eg orbitals, label
  500.                 rubout boxes, etc). To get the required paper colour when
  501.                 printing you must use the right colour paper in the printer.
  502.   Show pages    places lines on the drawing to show where the page breaks
  503.                 occur.
  504.   Print borders toggles whether or not the print margins are shown as a grey
  505.                 border on the drawing. The width of these will depend on the
  506.                 settings for the current printer.
  507.  
  508.  
  509. Captions menu
  510.  
  511.    The captions menu replaces the main menu when a caption is being added to
  512. the drawing.
  513.  
  514. Font...         choosing this opens a font panel window that allows the font
  515.                 style and size to be changed in mid-caption.
  516. Aspect ratio    leads to a submenu that allows you to change the ratio of
  517.                 font width to height. It is expressed in percent, so 50%
  518.                 gives characters half their normal width.
  519. Superscript     choosing this option toggles between superscripted and
  520.                 normal text. The submenu allows you to alter the size and
  521.                 position of superscripted text.
  522. Subscript       choosing this option toggles between subscripted and normal
  523.                 text. The submenu allows you to alter the size and position
  524.                 of subscripted text.
  525. Underline       choosing this option toggles between underlined and normal
  526.                 text. The submenu allows you to alter the thickness and
  527.                 position of the underlining.
  528. Colour          leads to a colour chooser dialogue box allowing you to alter
  529.                 the text colour.
  530. Abandon         abandons the current caption, ie returns the drawing to the
  531.                 state it was in before you started editing the caption.
  532.                 keyboard shortcut: Escape
  533. Finish          tells MoleDraw you have finished editing the caption, and
  534.                 adds it to the drawing.
  535.                 keyboard shortcut: Return
  536.  
  537.  
  538. Other keyboard shortcuts
  539. ========================
  540.  
  541.    ctrl Cursor Up   - double view scale
  542.    ctrl Cursor Down - halve view scale
  543.  
  544.  
  545. Preferences
  546. ===========
  547.  
  548.    The preferences window can be brought up either from the icon bar menu,
  549. or by clicking with 'adjust' on the icon bar. It allows you to set up the
  550. line width, bold width, fonts etc. used as default by each new drawing.
  551.  
  552.    Most options have a fairly obvious effect. Some may need a little
  553. explanation. The 'tolerance' defines how close the mouse pointer must be to
  554. an existing atom for the program to assume the mouse is over that atom. This
  555. determines whether new bonds added to the drawing will be bonded to existing
  556. atoms, and whether atoms will be merged when dragging them. The 'chain
  557. angle' determines the angle between bonds created with the chain tool.
  558. Finally, the 'bond spacing' is the distance between components of multiple
  559. bonds. It is expressed as a percentage of the bond length, so longer
  560. multiple bonds will have components that are further apart.
  561.  
  562.    Where line widths or other distances are needed a width of 0 means draw
  563. the thinnest line possible.
  564.  
  565.    Once you have set up your preferences you may save them by choosing the
  566. 'Permanent' icon, or use them now without saving them by choosing the
  567. 'Temporary' icon. Closing the window cancels any changes you have made since
  568. you last chose 'Temporary' or 'Permanent'.
  569.  
  570. Notes:
  571.  
  572.    Most changes made to the preferences will not effect files currently
  573. being edited, but will only effect files subsequently loaded or created.
  574. Changes that will effect all files are, the fixed length and angle, the
  575. tolerance, the chain angle and the bond spacing.
  576.  
  577.    The page size set up with the 'Paper limits' option on the icon menu will
  578. be saved with the preferences when 'Permanent' is chosen in the preferences
  579. window.
  580.  
  581.  
  582. Printer window
  583. ==============
  584.  
  585. !!! write about me, please !!!
  586.  
  587.  
  588. Font panel
  589. ==========
  590.  
  591.    This allows you to choose a font style and size. It presents you with a
  592. list of the font families installed on your computer, and the typefaces
  593. available for each one, in two scrollable windows within the dialogue box.
  594. Select a family and typeface from the lists and the new font will be
  595. previewed at the top of the dialogue box.
  596.  
  597.    To the right of the family and typeface lists is a list of standard font
  598. sizes (in points) from which you can choose. Alternatively you can enter a
  599. size of your own in the writeable icon at the bottom.
  600.  
  601.    Click on the 'OK' button to confirm your new selection and dispose of the
  602. font panel window.
  603.  
  604.  
  605. Loading and saving
  606. ==================
  607.  
  608.    MoleDraw saves its data as Draw files. Although these files contain extra
  609. data that MoleDraw uses (the coordinates of atoms etc) they are arranged in
  610. such a way that any normal DrawFile renderer will draw them exactly as they
  611. appear in MoleDraw. Information about the format of the Draw files produced
  612. by MoleDraw can be found in the '!MoleDraw.docs' directory.
  613.  
  614.    You will find that if you load a MoleDraw file into !Draw you will not be
  615. able to move any of the atom labels or bonds. This is because MoleDraw uses
  616. 'tagged' Draw objects in its files. These are normal Draw objects (and so
  617. can be rendered by Draw etc) but they have some extra data tagged on to the
  618. end of them. !Draw does not allow you to move tagged objects because this
  619. extra data may be somehow related to the objects coordinates (which it is,
  620. indirectly, in MoleDraw).
  621.  
  622.    Files may be exported in various formats. 'Draw' saves the file as a
  623. normal DrawFile except that none of the extra information normally saved by
  624. MoleDraw is included. This reduces the size of the file, but means that if
  625. it is loaded back into MoleDraw it is treated as just a picture, not a
  626. collection of atoms and bonds that can be manipulated in a chemically
  627. sensible way.
  628.  
  629.    Files may also be exported as Sprites. The Sprite will have the same
  630. number of colours and resolution as the current screen mode. The Sprite will
  631. be just large enough to hold all the objects. The easiest way to get a given
  632. sized Sprite is to draw a box around the objects - in the background colour
  633. if you don't want a border around your Sprite.
  634.  
  635.    'SMILES' files are text files containing a concise representation of the
  636. connection table. The SMILES format is commonly used in the computational
  637. chemistry field and is described in the file '!MoleDraw.docs.SMILES'.
  638. MoleDraw assumes all atoms are carbon unless they are labelled with chemical
  639. symbols. Subscripted numbers and superscripted number/charge combinations
  640. are handled in the way you would expect. So for example a label of 'CO_2^-'
  641. produces a charged carboxylic acid group in the resulting SMILES string.
  642.  
  643.  
  644. Known problems
  645. ==============
  646.  
  647.    When you choose an item from the 'Arrows', 'Orbitals' or 'Objects' menu
  648. the choice applies to all files, not just the one you are currently using.
  649.  
  650.    Font handles are not updated on mode changes. This means if you are
  651. editing a caption and you change the screen mode the fonts will not look
  652. correct until you have finished editing the caption. Also the font in the
  653. 'Info' dialogue box is not displayed correctly after changing modes, though
  654. this is due to a bug in the RISC OS Lib C library not my code!
  655.  
  656.    Doesn't undraw drag boxes properly when !madness is running.
  657.  
  658.  
  659. !!! remove these following sections !!!
  660.  
  661. #ifdef DEBUG
  662.  
  663. Bugs to fix
  664. ===========
  665.  
  666. ctrl+shift+F12 causes MoleDraw to exit but nothing else - although it does
  667. work as expected occasionally (!?)
  668.  
  669. Doesn't redraw window properly when rescaling from eg 200% to 100% and the
  670. window is scrolled right across to the right.
  671.  
  672. Restyling arrow heads: doesn't get it right if the arrow object has been
  673. resized or flipped horizontally or vertically (in fact anything that changes
  674. the aspect ratio of the arrow head) - cuz it uses the old arrow head coords
  675. and assumes the predefined aspect ratio to calc the angle/size the restyled
  676. one should be.
  677.  
  678.  
  679. Fatal internal errors
  680. =====================
  681.  
  682.    Some fatal errors will cause a stack backtrace to be produced, ie a list
  683. of the procedures currently being executed. You will be warned before this
  684. happens, by a normal error box, and given a summary of the following
  685. instructions:
  686.  
  687.    while the error box is still on the screen,
  688.    hold down ctrl+shift (to stop the backtrace scrolling passed too quick)
  689.    click on 'OK' to remove the error box
  690.    a white window will appear with nothing in it
  691.    release shift for a very short time and the first part of the backtrace
  692. will appear
  693.    write down the top two or three procedure names
  694.    release shift again to see more
  695.    once all the backtrace has appeared press space to continue
  696.  
  697.    See if you can consistently repeat the problem, and tell me about it!
  698.  
  699.    Sometimes an error box may appear with a message that starts "debug:".
  700. These are not (necessarily) fatal errors but are still things that I should
  701. know about! Try to find out how to repeat them.
  702.  
  703. #endif
  704.  
  705.  
  706. Release history
  707. ===============
  708.  
  709. v0.145D (23-Sep-94)
  710.  
  711.    Development version that lacked, among other things: captions; undo;
  712. saving of 'Export' file types; printing; background colours other than
  713. white; using 'Shift' to get aromatic rings; and the ability to alter the
  714. attributes of objects in the current selection with the 'Style' menu.
  715.  
  716.    Only released to a select few to get some feedback about how it was
  717. shaping up.
  718.  
  719. v0.168D (15-Dec-94)
  720.  
  721.    Development version released to Carl Cepurneek for testing. Additions:
  722. aromatic circles; benzene and cyclopentadiene tools do not increase bond
  723. order of existing bonds they overlap; drawings can extend over more than one
  724. page; font list is updated each time a Font Panel is opened; various bug
  725. fixes. New captions can be entered, but they are not added to the drawing
  726. when you've finished - also a bug in the caption editing code means fonts
  727. are not "lost" after being used, so the font cache tends to get full up with
  728. useless information.
  729.  
  730. v0.169D (17-Dec-94)
  731.  
  732.    Development version that fixed the 'Font_Lose' bug and handled subscripts
  733. and superscripts in captions better. It still doesn't add the captions to
  734. the drawing when you've finished editing them though. Released to various
  735. interested people on 'comp.sys.acorn' for testing.
  736.  
  737. v0.182D (15-Jan-95)
  738.  
  739.    Captions can now be added to the drawing. They become either text objects
  740. or text areas, depending on their complexity. Sadly at the moment text areas
  741. can not be re-edited once they have been created. Also the bounding boxes of
  742. text area's are not always the correct size.
  743.  
  744.    Should now work on RiscPC's as all 'draw_verifyObject()' calls have been
  745. removed. Uses Acorn's DrawFile module to render drawings now as the RISC OS
  746. Lib one can't do text areas with colour changes properly.
  747.  
  748.    Released to the 'comp.sys.acorn' people for more testing.
  749.  
  750. v0.184D (6-Feb-95)
  751.  
  752.    Minor bug fixes. Still no re-editing of text areas.
  753.  
  754. v0.185D (12-Mar-95)
  755.  
  756.    Big gap - been busy. Pasted data is now pasted at the position of the
  757. mouse pointer if it is over the drawing window. If not it is centred on the
  758. current view as before. Still haven't finished the text areas stuff. I've
  759. got lots of things planned out, they're just not coded up yet.
  760.  
  761. v0.195D (21-Apr-95)
  762.  
  763.    You can re-edit text areas at last! Now, when entering bonds, even if
  764. fixed angles/lengths are selected if you do the last mouse click on an atom
  765. the new bond ends at that atom. The pointer now has different shapes for
  766. different tools. You can now export Draw files (ie without all the extra
  767. data MoleDraw usually adds to them). When you drag the mouse to move, rotate
  768. or resize an object any moving bonds are also drawn during the drag instead
  769. of just the bounding boxes. When a molecule is moved, pasted etc, so its
  770. atoms overlap another molecule the overlapping atoms/bonds are now combined
  771. into single objects. [Still a couple of loose ends to tie up in the merging
  772. overlapping atoms stuff].
  773.  
  774. v0.200D (18-Jun-95)
  775.  
  776.    Bug fixed in the 'Export->Draw' code. Keyboard shortcuts for scale and
  777. rotate menu options added. Sprite objects can now be flipped horizontally
  778. and vertically. Minor bug fixes. When dragging, the bounding boxes of
  779. objects that contain only bonds are not drawn, just the bonds are. When
  780. dragging molecules to move them, any atoms in the molecules automatically
  781. 'snap' to the positions of existing atoms in the drawing when they are
  782. within the tolerance set up with the preferences. [This doesn't work for
  783. dragging to rotate or resize yet]. All the loose ends in the merging
  784. overlapping atoms stuff have been sorted out, except one. The groups which
  785. merged bonds etc end up in may not always be what you might expect.
  786.  
  787. v0.222D (6-Jan-96)
  788.  
  789.    Single bonds do not get put in groups on their own now when exporting
  790. Draw files. I've got Acorn's new C compiler so the code should be smaller
  791. and faster than with the older one! Bug fixes in changing text objects and
  792. merging atoms after dragging. The 'Style' menu can now be used to restyle
  793. the current selection. Undo is implemented for most operations, exceptions
  794. are: the erase tool; the caption tool; and using shift-click to alter double
  795. bond positions. There is a bug lurking somewhere in the undoing stuff,
  796. sometimes the connection table gets corrupted when you drag one molecule so
  797. it overlaps another after you've just undone something. Basically, at the
  798. moment be careful if you do lots of undoing.
  799.  
  800. v0.225D (4-Feb-96)
  801.  
  802.    You can undo erasing and captions now. Haven't been able to repeat the
  803. undoing bug! But I fixed another obscure memory problem so it may have been
  804. caused by that. Sorted out the eor plotting so now objects being placed on
  805. the drawing are plotted in cyan even in 256 colour modes and the marks on
  806. the rulers that show where the cursor is don't disappear in 256 colour
  807. modes. I haven't been able to test this in 32K or 16M modes. The paper
  808. colour can now be changed.
  809.  
  810. v0.226D (25-Feb-96)
  811.  
  812.    Undo changes to paper colour/size etc implemented. Arrows, lone pairs,
  813. and +/- signs now effected by fixed lengths/angles. Apparently text area
  814. objects, eg labels, don't appear in Impression Publisher. This will be the
  815. next thing to be sorted out - when I've got some spare time!
  816.  
  817. v0.230D (24-Mar-96)
  818.  
  819.    Found and fixed the undo memory bug. Added a Draw type grid. Apparently
  820. Impression can't handle text areas in Draw files, so the next thing to do is
  821. to change labels to (groups of) text objects.
  822.  
  823. v0.237D (21-Apr-96)
  824.  
  825.    Sprite files can now be exported. Atom labels are now text objects,
  826. rather than text areas. This means the bounding boxes are better and
  827. Impression can display them. Fixed the problem with tall brackets being too
  828. fat.
  829.  
  830. v0.239D (21-May-96)
  831.  
  832.    Bug fixes.
  833.  
  834.  
  835. Notable omissions
  836. =================
  837.  
  838. Can't export SMILES files yet.
  839.  
  840. No printing, and therefore no 'View->Print borders'. At the moment you have
  841. to print your drawings by loading them into Draw.
  842.  
  843.  
  844. ToDo list/ideas
  845. ===============
  846.  
  847. when dragging - scroll the window when the mouse ptr gets near to an edge
  848.  
  849. when entering chains - cursor says how many C atoms so far
  850.  
  851. when entering objects - highlight atoms as mouse moves over them
  852.  
  853. have some sort of user editable library of common structures and labels
  854. which can be quickly accessed from the menu or the toolbox
  855.  
  856. style guide says pasted data should replace the current selection - do we
  857. want to implement this?
  858.  
  859. click on the units name at the corner of the rulers to cycle through types
  860. of units
  861.  
  862. be able to load !!!AND PASTE!!! sprite files => wimp3 paste stuff needs to
  863. be able to handle more than one filetype
  864.  
  865. used fixed angle when doing rotation by dragging
  866.  
  867. error and label dbox open twice
  868.  
  869. sort out shift+ctrl+F12 exiting - probably same problem as error boxes etc
  870. opening twice - ie window handler getting called twice for some reason
  871.  
  872. on fatal errors may need to change ptr shape back to normal
  873.  
  874. fatal errors - save drawings to Wimp$Scrap
  875.  
  876. put cancel buttons in dboxes and get rid of their windows close buttons.
  877. Keep close buttons in actionless dboxes, eg proginfo etc
  878.  
  879. 2D templates - check 'globals.threed' variable
  880.  
  881. see which wimp messages we are really interested in
  882.  
  883. see how big wimpslot needs to be
  884.  
  885. support interactive help application (ie !Help)
  886.  
  887. Drag 'n' drop
  888.  
  889. Be able to break bonds so they appear to be behind another, eg for bridged
  890. rings etc
  891.  
  892. check that resizing text area objects with more than one column (test it
  893. with about ten) works properly
  894.  
  895.  
  896. Production version
  897. ==================
  898.  
  899. undefine DEBUG when compiling
  900.  
  901. set 'remove proc names' etc flags when compiling, I think 'Features' 'fah'
  902. are all the things that need setting
  903.  
  904. !!! remove this section !!!
  905.  
  906.  
  907. Acknowledgements
  908. ================
  909.  
  910.    Firstly thanks to Carl Cepurneek for lots of comments, ideas, bug reports
  911. and useful E-mail discussions.
  912.  
  913.    Thanks to Steve Perkins for drawing the original 'rubber' sprite, (the
  914. current ones are slightly squashed versions of it).
  915.  
  916.    Thanks also to Stewart Rubenstein who wrote the original Mac version of
  917. 'ChemDraw', of which this is a blatant copy. They say imitation is the
  918. sincerest form of flattery. However, hopefully ChemDraw is only copyrighted,
  919. and not patented, otherwise this program may only be available for a very
  920. short time before I become embroiled in an expensive legal battle!
  921.  
  922.    Finally, thanks to Guttorm Vik for writing 'StrongEd'. All the source
  923. code and most of the other text files were written using it.
  924.  
  925.  
  926. Use and Copying of this program
  927. ===============================
  928.  
  929.    MoleDraw is a 'Freeware' program, ie you can freely use and copy it as
  930. long as all of the following files are copied (unaltered) with it:
  931.  
  932.    !MoleDraw.!Choices
  933.              !Help              (this file)
  934.              !Run
  935.              !RunImage
  936.              !Sprites
  937.              !Sprites22
  938.              docs.DrawFiles
  939.                   mdobjs
  940.                   SMILES
  941.                   SMILESegs     (a MoleDraw file!)
  942.              Messages
  943.              Sprites
  944.              Sprites22
  945.              Templates
  946.  
  947.    The '!Choices' file is updated by the program as needed, you should not
  948. need to edit it yourself.
  949.  
  950.    If you feel you have been charged an excessive amount of money for this
  951. free program please remember, for future reference, that you can get copies
  952. of my programs by sending me a disc, your address, a nice letter and a stamp
  953. in a jiffy bag.
  954.  
  955.  
  956. Postamble
  957. =========
  958.  
  959.    Any comments, suggestions, bugs or donations can be sent to:
  960.  
  961.    Simon Kilvington,
  962.    46 Mead Road,
  963.    Portishead,
  964.    Bristol,
  965.    BS20 8NY.
  966.  
  967.    or send an E-mail to 'srk@soton.ac.uk'.
  968.  
  969.  
  970. ---
  971. Simon Kilvington, 8/4/96
  972.